package com.qn.analyze.service;

import com.qn.analyze.entity.UserMetrics;
import com.qn.analyze.mapper.UserMetricsMapper;
import com.qn.analyze.vo.UserMetricsQueryVo;
import com.qn.common.base.BaseServiceImpl;
import com.qn.common.base.model.BasicFetchPage;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * qingniu-cloud user source analysis
 *
 * @Author: TXG
 * @Date: 2024/6/11
 * @Version V0.0.2
 */
@DubboService(version = "1.0.0")
public class UserMetricsServiceImpl
        extends BaseServiceImpl<UserMetrics>
        implements UserMetricsService {
    @Autowired
    UserMetricsMapper baseMapper;
    @Override
    public BasicFetchPage<UserMetrics> getList(UserMetricsQueryVo where) {
        return new BasicFetchPage(baseMapper.getListCount(where), baseMapper.getList(where));
    }

    @Override
    public Integer getListCount(UserMetricsQueryVo where) {
        return baseMapper.getListCount(where);
    }

    
    @Override
    public BasicFetchPage<UserMetrics> getCkfList(UserMetricsQueryVo where) {
        return new BasicFetchPage(baseMapper.getCkfListCount(where), baseMapper.getCkfList(where));
    }

    
    @Override
    public Integer getCkfListCount(UserMetricsQueryVo where) {
        return baseMapper.getCkfListCount(where);
    }

    
    @Override
    public BasicFetchPage<UserMetrics> getJa4List(UserMetricsQueryVo where) {
        return new BasicFetchPage(baseMapper.getJa4ListCount(where), baseMapper.getJa4List(where));
    }

    
    @Override
    public Integer getJa4ListCount(UserMetricsQueryVo where) {
        return baseMapper.getJa4ListCount(where);
    }

    
    @Override
    public BasicFetchPage<UserMetrics> getIp4List(UserMetricsQueryVo where) {
        return new BasicFetchPage(baseMapper.getIp4ListCount(where), baseMapper.getIp4List(where));
    }

    
    @Override
    public Integer getIp4ListCount(UserMetricsQueryVo where) {
        return baseMapper.getIp4ListCount(where);
    }

    @Override
    public List<UserMetrics> getHostList(UserMetricsQueryVo where) {
        return baseMapper.getHostList(where);
    }

    @Override
    public List<UserMetrics> getRefererList(UserMetricsQueryVo where) {
        return baseMapper.getRefererList(where);
    }
}
